dc generator construction and working